﻿<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {

    }


    [DirectMethod]
    public void OnCustomerComboTriggerClick()
    {
        X.AddScript("CustomerListStore.reload()");
    }
</script>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
    <title>添加送货单</title>
    <script type="text/javascript" src="/Scripts/Commen.js"></script>
    <script type="text/javascript" src="/Scripts/BD_Product/BD_ProductOutInCount_Index.js"></script>
</head>
<body>
    <script type="text/javascript" src="/Scripts/ExtTimeOut.js"></script>
    <script type="text/javascript" src="/Scripts/ExtRequiredFieldPluins.js"></script>
    <script type="text/javascript">
        var changeSortDirect = function () {
            if (SortDirect.Value == "desc" || SortDirect.Value == "") {
                SortDirect.Value = "asc";
            }
            else {
                SortDirect.Value = "desc";
            }
        };
    </script>
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:Store ID="CountReportStore" runat="server" AutoLoad="false">
        <Proxy>
            <ext:HttpProxy Url="/Product/ProductOutInCountList/" />
        </Proxy>
        <Reader>
            <ext:JsonReader IDProperty="FProductNumber" Root="data" TotalProperty="total">
                <Fields>
                    <ext:RecordField Name="FProductNumber" />
                    <ext:RecordField Name="FProductName" />
                    <ext:RecordField Name="FProductUnit" />
                    <ext:RecordField Name="FOutQty" />
                    <ext:RecordField Name="FInQty" />
                </Fields>
            </ext:JsonReader>
        </Reader>
        <BaseParams>
            <ext:Parameter Name="FProductNumber" Value="#{FProductNumber}.getValue()" Mode="Raw" />
            <ext:Parameter Name="FProductName" Value="#{FProductName}.getValue()" Mode="Raw" />
            <ext:Parameter Name="FDateFrom" Value="#{FDateFrom}.getValue()" Mode="Raw" />
            <ext:Parameter Name="FDateTo" Value="#{FDateTo}.getValue()" Mode="Raw" />
        </BaseParams>
    </ext:Store>
    <ext:Viewport ID="Viewport" runat="server" Layout="BorderLayout">
        <Items>
            <ext:FormPanel ID="Panel1" runat="server" Region="North" Split="true" Collapsible="true"
                Height="80" Layout="HBoxLayout" LabelAlign="Right" LabelWidth="80" Header="false"
                Border="false">
                <TopBar>
                    <ext:Toolbar ID="Toolbar1" runat="server">
                        <Items>
                            <ext:ToolbarFill ID="ToolbarFill2" runat="server" />
                            <ext:Button ID="Button6" runat="server" Text="统计" Icon="Accept">
                                <Listeners>
                                    <Click Fn="ProductOutInCount.Mgr.searchList" />
                                </Listeners>
                            </ext:Button>
                            <ext:Button ID="Button1" runat="server" Text="清空" Icon="Cancel">
                                <Listeners>
                                    <Click Fn="ProductOutInCount.Mgr.resetSearchFrom" />
                                </Listeners>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                    <ext:Panel ID="Panel3" runat="server" Border="false" Header="false" Layout="FormLayout"
                        LabelAlign="Left" Padding="5">
                        <Items>
                            <ext:TextField ID="FProductNumber" runat="server" FieldLabel="产品编号" Width="140" />
                        </Items>
                    </ext:Panel>
                    <ext:Panel ID="Panel4" runat="server" Border="false" Header="false" Layout="FormLayout"
                        LabelAlign="Left" Padding="5">
                        <Items>
                            <ext:TextField ID="FProductName" runat="server" FieldLabel="产品名称" Width="140" />
                        </Items>
                    </ext:Panel>
                    <ext:Panel ID="Panel5" runat="server" Border="false" Header="false" Layout="FormLayout"
                        LabelAlign="Left" Padding="5">
                        <Items>
                            <ext:DateField ID="FDateFrom" runat="server" FieldLabel="开始日期" Width="140" Format="yyyy/MM/dd" />
                        </Items>
                    </ext:Panel>
                    <ext:Panel ID="Panel6" runat="server" Border="false" Header="false" Layout="FormLayout"
                        LabelAlign="Left" Padding="5">
                        <Items>
                            <ext:DateField ID="FDateTo" runat="server" FieldLabel="结束日期" Width="140" Format="yyyy/MM/dd" />
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:FormPanel>
            <ext:Panel ID="Panel2" runat="server" Region="Center" Layout="AccordionLayout" Split="true">
                <Items>
                    <ext:GridPanel ID="DetailGridPanel" runat="server" StripeRows="true" ClicksToEdit="1"
                        Height="400" AutoExpandColumn="FProductName" Border="false" StoreID="CountReportStore">
                        <TopBar>
                            <ext:Toolbar ID="TopBar" runat="server">
                                <Items>
                                    <ext:ToolbarFill ID="ToolbarFill1" runat="server" />
                                    <ext:Button ID="Button5" runat="server" Text="导出并打印" Icon="Printer">
                                        <Listeners>
                                            <Click Fn="ProductOutInCount.Mgr.Print" />
                                        </Listeners>
                                    </ext:Button>
                                </Items>
                            </ext:Toolbar>
                        </TopBar>
                        <ColumnModel ID="ColumnModel1" runat="server" DefaultSortable="false">
                            <Columns>
                                <ext:Column ColumnID="FProductNumber" Header="产品编号" DataIndex="FProductNumber" Width="120"
                                    Sortable="true">
                                </ext:Column>
                                <ext:Column ColumnID="FProductName" Header="产品名称" DataIndex="FProductName">
                                </ext:Column>
                                <ext:Column ColumnID="FProductUnit" Header="产品单位" DataIndex="FProductUnit">
                                </ext:Column>
                                <ext:Column ColumnID="FOutQty" Header="出货数" DataIndex="FOutQty" Width="100">
                                </ext:Column>
                                <ext:Column ColumnID="FInQty" Header="进货数" DataIndex="FInQty" Width="100">
                                </ext:Column>
                            </Columns>
                        </ColumnModel>
                    </ext:GridPanel>
                </Items>
            </ext:Panel>
        </Items>
    </ext:Viewport>
</body>
</html>
